package com.mlnx.yingbaisui.device.leida;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import org.shan.iot.handler.NettyByteDecoder;
import org.shan.iot.protocol.ReqRepMsg;
import org.shan.iot.server.codec.HLCDecoder;

/**
 * Created by amanda.shan on 2023/3/2.
 */
public class TestNettyServerDecoder extends NettyByteDecoder {

    private HLCDecoder hlcDecoder = new TestHLCDecoder();

    @Override
    protected ReqRepMsg decode(ChannelHandlerContext ctx, ByteBuf in) {

        ReqRepMsg reqRepMsg = hlcDecoder.decode(ctx, in);

        return reqRepMsg;
    }
}
